class FinishedInScan {
  String? id;
  String? workOrderId;
  String? workshopId;
  String? locationId;
  String? productorderno;
  String? productName;
  String? productCode;
  String? productstyle;
  String? batchno;
  String? stockqty;
  String? unitname;

  FinishedInScan({
    this.id,
    this.workOrderId,
    this.workshopId,
    this.locationId,
    this.productorderno,
    this.productName,
    this.productCode,
    this.productstyle,
    this.batchno,
    this.stockqty,
    this.unitname,
  });

  FinishedInScan copyWith({
    String? id,
  }) {
    return new FinishedInScan(
      id: id ?? this.id,
    );
  }

  @override
  String toString() {
    return '''FinishedInScan{
      id: id,
    }''';
  }

  factory FinishedInScan.fromMap(Map<String, dynamic> map) {
    return new FinishedInScan(
      id: map['id'] != false ? map['id'].toString() as String? : "",
      productorderno:
          map['name'] != false ? map['name'].toString() as String? : "",
      productCode: map['product_tmpl_id']['default_code'] != false
          ? map['product_tmpl_id']['default_code'].toString() as String?
          : "",
      productName: map['product_tmpl_id']['name'] != false
          ? map['product_tmpl_id']['name'].toString() as String?
          : "",
      productstyle: map['product_tmpl_id']['description'] != false
          ? map['product_tmpl_id']['description'].toString() as String?
          : "",
      stockqty: map['product_qty'] != false
          ? map['product_qty'].toString() as String?
          : "",
      unitname: map['product_uom_id'] != false
          ? map['product_uom_id'][1].toString() as String?
          : "",
    );
  }

  Map<String, dynamic> toMap() {
    // ignore: unnecessary_cast
    return {
      'id': this.id,
    } as Map<String, dynamic>;
  }

  List toDomainList() {
    List list = [] as List;
    // ignore: unnecessary_cast
    return list;
  }

  Map<String, dynamic> toOdooMap() {
    // ignore: unnecessary_cast
    return {
      'id': this.id,
    } as Map<String, dynamic>;
  }
}
